// Copyright (c) 2012, http://code.google.com/p/example-xplane-plugins/
// All rights reserved.
// 
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//     * Redistributions of source code must retain the above copyright
//       notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above copyright
//       notice, this list of conditions and the following disclaimer in the
//       documentation and/or other materials provided with the distribution.
//     * Neither the name of "example-xplane-plugins" nor the
//       names of its contributors may be used to endorse or promote products
//       derived from this software without specific prior written permission.
// 
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL "example-xplane-plugins" BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#ifndef XPSCREENGRAB_CONSTANTS_H
#define XPSCREENGRAB_CONSTANTS_H

// SHARE SAME FILE - OR ENSURE CONTENTS MATCH LOCAL VERSIONS IN BOTH XPLANE AND MATLAB PLUGINS

#define PLUGIN_NAME         "ScreenGrabber"
#define PLUGIN_ID           "exam.examples.screengrabber"
#define PLUGIN_DESCRIPTION  "Plug-in that exposes the opengl window pixels via a BOOST shared memory interface."

static const double PI(3.14159265358979);
static const double RAD_TO_DEG(180.0 / PI);
static const double DEG_TO_RAD(1.0 / RAD_TO_DEG);

static const int MAX_WIDGET_STRING_LENGTH(256);
static const int MAX_ERROR_STRING_LENGTH(1024);

static const int SCREENSHOT_NUM_COLOR_PLANES(3);
static const int SCREENSHOT_WIDTH(1024);
static const int SCREENSHOT_HEIGHT(768);
static const int SCREENSHOT_NUMPIXELS(SCREENSHOT_WIDTH * SCREENSHOT_HEIGHT);
static const int SCREENSHOT_NUMBYTES(SCREENSHOT_NUM_COLOR_PLANES * SCREENSHOT_NUMPIXELS);

static const char SHARED_MEMORY_NAME[] = {"xplane_screengrab_mem"};
static const char SHARED_MUTEX_NAME[] = {"xplane_screengrab_mutex"};

#endif
